package com.hnxx.studentsystem.controller;


import com.hnxx.studentsystem.pojo.Student;
import com.hnxx.studentsystem.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {
    @Autowired
    StudentService studentService;

    @RequestMapping("/hello")
    public List<Student> findAll(){
        return  studentService.findAll();
    }

}
